package com.sugar.persistence.oa.hr.impl;

import java.util.LinkedHashMap;
import java.util.List;

import org.springframework.stereotype.Controller;

import com.sugar.common.base.persistence.IHibernateBaseDaoSupport;
import com.sugar.common.base.persistence.query.PageModel;
import com.sugar.domain.oa.hr.EmpAccount;
import com.sugar.persistence.oa.hr.IEmpAccount;

@Controller
public class EmpAccountDaoImpl extends IHibernateBaseDaoSupport<EmpAccount> implements IEmpAccount {
	
	@Override
	public void deleteEmpAccountDao(EmpAccount account) {
		this.deleteEntityBaseDao(account) ;
	}

	@Override
	public List<EmpAccount> findEmpAccountDao(String queryString, String whereStr,
			Object[] param, LinkedHashMap<String, String> orderby)
			throws RuntimeException {
	
		return this.findMoreEntityByParam(queryString, whereStr, param, orderby) ;
	}

	@Override
	public PageModel<EmpAccount> getScorllEmpAccountDao(String queryString,
			String whereStr, Object[] param, int firstPage, int pageSize,
			LinkedHashMap<String, String> orderby) {
	
		return this.getScrollRecord(queryString, whereStr, param, firstPage, pageSize, orderby);
	}

	@Override
	public EmpAccount loadEmpAccountByIdDao(int id) {
	
		return this.getEntityById(EmpAccount.class, id) ;
	}

	@Override
	public void saveEmpAccountDao(EmpAccount account) {
		this.saveEntityBaseDao(account) ;
	}

	@Override
	public void updateEmpAccountDao(EmpAccount account) {
		this.updateEntityBaseDao(account) ;
	}

	@Override
	public EmpAccount findEmpAccountByParamDao(String queryString,
			String whereString, Object[] param) {
		return this.findEntityByParam(queryString, whereString, param) ;
	}

}
